﻿<%@ Page Language="vb" ContentType="text/xml" AutoEventWireup="false" CodeBehind="RssTest.aspx.vb" Inherits="TeachersWorkSheets.RssTest" %>


             <asp:SqlDataSource ID="SheetListDataSource" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:SheetsConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:SheetsConnectionString.ProviderName %>" 
                    SelectCommand="SELECT [ID], [ShtFile], [ShtName], [ShtRate], [ShtSubject], [ShtGrade], [ShtRegDate] FROM [ActivitySheet]">
                </asp:SqlDataSource>
 <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SheetListDataSource">
 <HeaderTemplate>
    <rss version="2.0">
    <channel>
    <tile>Teachers Activiy Sheets</tile>
    <description>Sheet for Ecery science teacher</description>
 </HeaderTemplate>
 <ItemTemplate>
    <item>
        <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "ShtName"))%></title>
        <description><%# FormatForXML(DataBinder.Eval(Container.DataItem, "ShtSubject"))%></description>
        <link> Details.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "ID"))%></link>
        <author><%# FormatForXML(DataBinder.Eval(Container.DataItem, "ShtGrade"))%></author>
        <pubDate><%# FormatForXML(DataBinder.Eval(Container.DataItem, "ShtRegDate"))%></pubDate>
    </item>
 </ItemTemplate> 
 <FooterTemplate>
    </channel>
  </rss>
 </FooterTemplate>
</asp:Repeater>


